const Service = require('egg').Service;

class UserService extends Service {
  async findByUsername(username) {
    let sql = "select * from user where username = ?";
    let params = [username];
    let res = await this.app.mysql.query(sql,params);
    return res[0];
  }
}

module.exports = UserService;